package com.syedu.day03;

/**
 * description：循环语句
 * 1.while循环
 * 2.do while循环
 *
 * 区别:
 * while先判断,后执行
 * do while先执行,后判断
 *
 * @author Administrator
 * @date 2022/3/8 10:29
 */
public class WhileDemo {
    public static void main(String[] args) {
        int i = 10;
        while (i < 10) {
            System.out.println(i++);
        }

        /*while(true){
            //死循环
        }*/

        System.out.println("---------------------");

        do {
            System.out.println(i++);
        } while (i < 10);
    }
}